﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using MODEL;
using System.Text;


public partial class ViewDetails : System.Web.UI.Page
{
    protected StudentModel model = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"];
        if (!string.IsNullOrEmpty(id))
        {
            StudentBLL bll = new StudentBLL();
            model = bll.QueryByCondition(id);
        }
    }

    protected string GetNowUserName()
    {
        return new StudentBLL().QueryByCondition(new WebHelper().GetUInfo()).SCnName;
    }

    protected string GetPinglun()
    {
        List<PinglunModel> list = new PinglunBLL().QueryByCondition(model);
        StringBuilder sb = new StringBuilder();
        if (list!=null)
        {
            foreach (PinglunModel p in list)
            {
                sb.Append("<tr><td>"+p.PFromStudent.SCnName+" 说：</td><td>"+p.PContent+"</td></tr>");
            }
        }
        else
        {
        }
        return sb.ToString();
    }
}